<?php
/*
 * @ https://EasyToYou.eu - IonCube v11 Decoder Online
 * @ PHP 7.2 & 7.3
 * @ Decoder version: 1.1.6
 * @ Release: 10/08/2022
 */

// Decoded file for php version 71.
namespace AlibabaCloud\Client\Filter;

class HttpFilter
{
    public static function host($host)
    {
        if(!is_string($host)) {
            throw new \AlibabaCloud\Client\Exception\ClientException("Host must be a string", \AlibabaCloud\Client\SDK::INVALID_ARGUMENT);
        }
        if($host === "") {
            throw new \AlibabaCloud\Client\Exception\ClientException("Host cannot be empty", \AlibabaCloud\Client\SDK::INVALID_ARGUMENT);
        }
        return $host;
    }
    public static function scheme($scheme)
    {
        if(!is_string($scheme)) {
            throw new \AlibabaCloud\Client\Exception\ClientException("Scheme must be a string", \AlibabaCloud\Client\SDK::INVALID_ARGUMENT);
        }
        if($scheme === "") {
            throw new \AlibabaCloud\Client\Exception\ClientException("Scheme cannot be empty", \AlibabaCloud\Client\SDK::INVALID_ARGUMENT);
        }
        return $scheme;
    }
    public static function body($body)
    {
        if(!is_string($body) && !is_numeric($body)) {
            throw new \AlibabaCloud\Client\Exception\ClientException("Body must be a string or int", \AlibabaCloud\Client\SDK::INVALID_ARGUMENT);
        }
        if($body === "") {
            throw new \AlibabaCloud\Client\Exception\ClientException("Body cannot be empty", \AlibabaCloud\Client\SDK::INVALID_ARGUMENT);
        }
        return $body;
    }
    public static function method($method)
    {
        if(!is_string($method)) {
            throw new \AlibabaCloud\Client\Exception\ClientException("Method must be a string", \AlibabaCloud\Client\SDK::INVALID_ARGUMENT);
        }
        if($method === "") {
            throw new \AlibabaCloud\Client\Exception\ClientException("Method cannot be empty", \AlibabaCloud\Client\SDK::INVALID_ARGUMENT);
        }
        return strtoupper($method);
    }
    public static function contentType($contentType)
    {
        if(!is_string($contentType)) {
            throw new \AlibabaCloud\Client\Exception\ClientException("Content-Type must be a string", \AlibabaCloud\Client\SDK::INVALID_ARGUMENT);
        }
        if($contentType === "") {
            throw new \AlibabaCloud\Client\Exception\ClientException("Content-Type cannot be empty", \AlibabaCloud\Client\SDK::INVALID_ARGUMENT);
        }
        return $contentType;
    }
    public static function accept($accept)
    {
        if(!is_string($accept)) {
            throw new \AlibabaCloud\Client\Exception\ClientException("Accept must be a string", \AlibabaCloud\Client\SDK::INVALID_ARGUMENT);
        }
        if($accept === "") {
            throw new \AlibabaCloud\Client\Exception\ClientException("Accept cannot be empty", \AlibabaCloud\Client\SDK::INVALID_ARGUMENT);
        }
        return $accept;
    }
}

?>